#ifndef _RENZO_TYPEDEF_
#define _RENZO_TYPEDEF_

#include "RenzoMustHave.h"
#include <float.h>
#include <string>
using namespace std;

namespace Renzo {
	// String
	typedef std::string String;

	#define INF_MAX		FLT_MAX;
	#define INF_MIN		FLT_MIN;

	typedef Float2		float2;
	typedef Float3		float3;
	typedef Float4		float4;
	typedef Matrix4		mat4;

	typedef unsigned int	Index;
	typedef unsigned int	TexID;
	typedef Float4			TexCoord;
	typedef unsigned int	uint;

	/*
	 ResourceID encodes the following information:
	 - Resource type: the most significant 8-bit encodes the resource type (image, texture, model, memory)
	 - Resource index
	 */
	/*
	struct ResourceID {
		unsigned char type;
		int index;
	};
	*/	
	/*
	enum ResourceType {
		RESOURCE_TYPE_DEFAULT,
		RESOURCE_TYPE_OBJECT,
		RESOURCE_TYPE_IMAGE,
		RESOURCE_TYPE_TEXTURE,
		RESOURCE_TYPE_MODEL,
		NB_RESOURCE_TYPES
	};
	*/
	typedef unsigned long ResourceID;
	//typedef unsigned char ResourceType;
	typedef unsigned long ResourceIndex;
	//#define ResourceTypeGet(x) ((char)(x >> 24))
	#define ResourceTypeGet(x) ((ObjectType)(x >> 24))
	#define ResourceIndexGet(x) (x & 0x00111111)
	
	
	#define rzNew
	#define rzDel(x) delete (x); (x) = 0;
	#define rzDels(x) delete [] (x); (x) = 0;
	#define rzMalloc
	#define rzFree(x) free(x);

	struct Size {
		int width;
		int height;
	};

	struct Range {
		int start;
		int end;
	};
	
	enum PixelFormat {
		rzRGB8,
		rzRGBA8,
		rzRGB16,
		rzRGBA16,
		rzRGB32,
		rzRGBA32
	};

	enum TouchState {
		UNTOUCHED = 0,
		TOUCHED = 1
	};
}

#endif